<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>GO机网管理后台</title>
	<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
	<link href="../../css/bootstrap.min.css" rel="stylesheet">
	<link href="css/nifty.min.css" rel="stylesheet">
	<link href="../../css/demo/nifty-demo-icons.min.css" rel="stylesheet">
	<link href="../../plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<link href="../../plugins/pace/pace.min.css" rel="stylesheet">
	<script src="../../plugins/pace/pace.min.js?2016/8/5"></script>
	<script src="../../js/jquery-2.2.1.min.js"></script>
	
	<style>
		#table div {
			padding: 5px;
			margin: 0;
			color: #757575;
		}
		
		td {
			vertical-align: middle !important;
			
		}
		
		.panel.active {
			border-color: #2ac845;
		}
	</style>
</head>
<body id="main">
<div id="container" class="effect mainnav-lg">
	@@include('public/header.html')
	<div class="boxed">
		<div id="content-container">
			
			<div id="page-title" style="position: relative">
				<h1 class="page-header text-overflow">用户反馈</h1>
			</div>
			
			<div id="page-content">
				<div class="col-sm-12 pad-btm pad-top">
					<table class="table table-striped" id="table">
						<tr v-for="o in datas">
							<td width="220">
								<div>
									<span v-text="o.ctime | time"></span>
									<span style="color:#ff9800;padding-left:25px;" v-text="types[o.type]"></span>
								</div>
								<div v-text="o.content"></div>
							</td>
						</tr>
						<tr v-if="datas.length==0">
							<td colspan="4" style="text-align: center"><h4>没有数据</h4></td>
						</tr>
					</table>
				</div>
			</div>
		</div>
		
		<nav id="mainnav-container">
			@@include('public/left_menu.html')
		</nav>
	</div>
</div>
@@include('public/footer.html')

<script src="../../plugins/vue/vue.min.js"></script>
<script src="js/vue-validator.min.js"></script>
<script src="../../js/base.js"></script>
<script>
	Vue.filter('time', function (value) {
		var date = new Date(parseInt(value)*1000);
		var seperator1 = "-";
		var seperator2 = ":";
		var month = date.getMonth() + 1;
		var strDate = date.getDate();
		if (month >= 1 && month <= 9) {
			month = "0" + month;
		}
		if (strDate >= 0 && strDate <= 9) {
			strDate = "0" + strDate;
		}
		var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
			+ " " + date.getHours() + seperator2 + date.getMinutes()
			+ seperator2 + date.getSeconds();
		
		return currentdate;
	});
	
	var vue = new Vue({
		el: "#main",
		data: {
			datas: [],
			types: ["建议", "投诉"]
		},
		methods: {
			/*根据状态加载订单*/
			loadDatas: function (status) {
				this.status = status;
				$.get(apiRecycle + "index.php/Admin/DataList/getFeedBackList", {}, function (res) {
					vue.datas = res.data;
				}, "json");
			}
		},
		ready: function () {
			this.loadDatas(status);
		}
	});
</script>
</body>
</html>
